package com.ostrich.cloud.ostrichDistributionService.client;

import com.ostrich.cloud.common.result.Result;
import com.ostrich.cloud.ostrichDistributionService.client.param.FinishedParam;
import com.ostrich.cloud.ostrichDistributionService.client.param.OrderParam;
import com.ostrich.cloud.ostrichDistributionService.client.param.PageSelectForm;
import com.ostrich.cloud.ostrichDistributionService.client.param.StoreParam;
import com.ostrich.cloud.param.DeliveryOrderparam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

/**
* name是项目名，contextId是client的名字
*/
@FeignClient(contextId = "deliveryOrderClient",name = "ostrichDistributionService")
public interface DeliveryOrderClient {

    @PostMapping("storeAdd")
    public Result storeAdd(@RequestBody StoreParam param);
    @PostMapping("orderAdd")
    public Result orderAdd(@RequestBody OrderParam param);
    @PostMapping("getDeliveryPage")
    public Result getDeliveryPage(@RequestBody  PageSelectForm form);
    @PostMapping("finishedDelicery")
    public Result finishedDelicery(@RequestBody FinishedParam param);
    @GetMapping("getOne")
    public DeliveryOrderparam getOne(@RequestParam("did") Integer did);
}
